package cn.chenxinjie.hrm.controller;

import cn.chenxinjie.hrm.util.AjaxResult;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 陈鑫杰
 * @date 2022/3/21 15:53
 */
@RestController
public class SuccessController {
    @PostMapping("/success")
    public AjaxResult success(){
        return AjaxResult.me().setMessage(SecurityContextHolder.getContext().getAuthentication().getName() + "宝贝儿你来啦");
    }
}
